04_How to set things up in a function.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet

#A good starting point (just for you to get organised and develop good habits) is to put all your code in a function.
#As you develop your code and have many functions, you can call them from your main function

def main():
    print("This is my main function")




main() #This calls the main function, which means whatever it is in it will "run" when the program is executed
                    

Try it yourself